﻿@model HanGu.Entity.Manager
@{
    Layout = null;
   
}
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
    <title>汉古CRM</title>
    <link href="/Content/themes/css/login.css" rel="stylesheet" type="text/css" />
    <link href="/Content/themes/default/style.css" rel="stylesheet" type="text/css" media="screen" />
    <link href="/Content/themes/css/core.css" rel="stylesheet" type="text/css" media="screen" />
    <script src="/Scripts/DWZ/speedup.js" type="text/javascript"></script>
    <script src="/Scripts/DWZ/jquery-1.7.1.js" type="text/javascript"></script>
    <script src="/Scripts/DWZ/jquery.cookie.js" type="text/javascript"></script>
    <script src="/Scripts/DWZ/jquery.validate.js" type="text/javascript"></script>
    <script src="/Scripts/DWZ/jquery.bgiframe.js" type="text/javascript"></script>
    <script src="/Scripts/DWZ/dwz.min.js" type="text/javascript"></script>
    @*    <script src="/Scripts/DWZ/dwz.regional.zh.js" type="text/javascript"></script>
*@
    <script>
        function login() {
            var User = $("#User").val();
            var Pwd = $("#Pwd").val();
            var code = $("#code").val();
            if (User == "" || Pwd == "" || code == "") {
                alert("账号，密码和验证码不能为空");
                return false;
            }
            $.ajax({
                type: "POST",
                url: "/login/validate",
                data: "User=" + User + "&Pwd=" + Pwd + "&code=" + code,
                success: function (data) {
                    var json = eval("(" + data + ")");
                    if (json.statusCode == 200) {
                        window.location = '@Url.Action("index", "main")';
                    }
                    else {
                        $("#valiCode").click();
                        $("#code").val("");
                        alert(json.message);
                    }
                }
            });
            return false;
        }
    </script>
</head>
<body style="background-color: #ffffff">
    <div id="login">
        <div id="login_header">
            <h1 class="login_logo">
                <img src="/Content/themes/default/images/login_logo.gif" />
            </h1>
            <div class="login_headerContent">
                <div class="navList">
                </div>
                <h2 class="login_title">
                    <img src="/Content/themes/default/images/login_title.png" /></h2>
            </div>
        </div>
        <div id="login_content">
            <div class="loginForm">
                <form action="/login/validate" onsubmit="return login();">
                <p>
                    <label>
                        用户名：</label>
                    <input type="text" name="User" id="User" class="login_input" style="width: 150px" />
                </p>
                <p>
                    <label>
                        密码：</label>
                    <input type="password" name="Pwd" id="Pwd" class="login_input" style="width: 150px" />
                </p>
                <p>
                    <label>
                        验证码：</label>
                    <input class="code" name="code" id="code" type="text" size="5" />
                    <span>
                        <img id="valiCode" style="cursor: pointer;" src="/login/GetValidateCode" alt="验证码"
                            onclick="this.src='/login/GetValidateCode?time=' + (new Date()).getTime();" />
                    </span>
                </p>
                <div class="login_bar">
                    <input class="sub" type="submit" value=" " />
                </div>
                </form>
            </div>
            <div class="login_banner">
                <img src="/Content/themes/default/images/login_banner.jpg" /></div>
            <div class="login_main">
                <div class="login_inner">
                </div>
            </div>
        </div>
        <div id="login_footer">
            Copyright &copy; 2015.上海云集信息科技有限公司 Ver @System.Reflection.Assembly.LoadFrom(Server.MapPath("~/bin/HanGu.CRM.DLL")).GetName().Version.ToString()

        </div>
    </div>
</body>
</html>
